//.overflow1 {
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap; }
export default {
  data() {
    return { innervalue: '' };
  },
  render(h) {
    //是不是空白的节点
    function isEmptyTextDom(slots = []) {
      if (slots.length >= 2) return false;
      
      if (slots &&
        slots[0] &&
        !slots[0].elm &&
        !slots[0].text) {
        return true;
      }
      
      if (slots &&
        slots[0] &&
        slots[0].elm &&
        slots[0].elm.nodeName === '#text'
        && slots[0].elm.text === ''
      ) {
        return true;
      }
    }
    
    
    /*style:{
      overflow:'hidden',
        textOverflow:'ellipsis',
        whiteSpace:'nowrap',
    }
    <el-tooltip class="item" effect="dark" content="Top Left 提示文字" placement="top-start">
        <el-button>上左</el-button>
    </el-tooltip>

    */
    
    var content = this.$slots.default;
    return (
      isEmptyTextDom(this.$slots.default)
        ? <span>暂无</span>
  : <el-tooltip effect="dark" placement="top-start">
      <div slot="content">{h('span', {}, content)}</div>
    {h('span', {
      style: {
        overflow: 'hidden',
        textOverflow: 'ellipsis',
        whiteSpace: 'nowrap',
        display: 'inline-block',
        maxWidth: '100%',
        lineHeight:'16px'
      },
    }, content)}
  </el-tooltip>
  );
  },
  
};
